package com.bawei.module_play.api

import com.bawei.lib_common.api.BaseApiServer
import com.bawei.lib_common.entriy.BaseResponse
import com.bawei.module_play.entriy.AuthorEntriy
import com.bawei.module_play.entriy.CommendEntity
import com.bawei.module_play.entriy.CommentEntriy
import com.bawei.module_play.entriy.CommentEntriyItem
import com.bawei.module_play.entriy.DanmuEntity
import com.bawei.module_play.entriy.MovieVideoEntityItem
import com.bawei.module_play.entriy.SimpleVideoEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface PlayApiServer :BaseApiServer{

    @GET("/videoauthor/getAuthorById")
    suspend fun getAuthorById(@Query("userid" )userId:String):BaseResponse<AuthorEntriy>

    //获取首页推荐视频

    @GET("/videosimple/getRecommendSimpleVideo")
    suspend fun getRecommendSimpleVideo(@Query("page") page: Int, @Query("pagesize") pageSize: Int): BaseResponse<List<SimpleVideoEntity>>

    //获取首页分类下载视频
    @GET("/videosimple/getSimpleVideoByChannelId")
    suspend fun getSimpleVideoByChannelId(@Query("channelId") channelId: String, @Query("page") page: Int, @Query("pagesize") pageSize: Int): BaseResponse<List<SimpleVideoEntity>>

    //获取放映厅推荐视频
    @GET("/videomulti/getRecommendMutilVideo")
    suspend fun getRecommendMultiVideo(@Query("page") page:Int,@Query("pagesize") pageSize: Int):BaseResponse<List<MovieVideoEntityItem>>

    //获取二级分类视频
    @GET("/videomulti/getMutilVideoByTypeId")
    suspend fun getMultiVideoByTypeId(@Query("typeid") typeId: Int,@Query("page") page: Int,@Query("pagesize") pageSize:Int): BaseResponse<List<MovieVideoEntityItem>>


    //视频评论
    @GET("/comment/getCommentByUserId")
    suspend fun getCommentByUserId(@Query("datatype") dataType:Int,@Query("itemid") itemId: String): BaseResponse<List<CommentEntriyItem>>

    //发送评论
    @POST("/comment/publishComment")
    suspend fun publishComment(@Body requestBody: RequestBody):BaseResponse<CommendEntity>

    //发布弹幕
    @POST("/bulletscreen/publishBulletScreen")
    suspend fun publishDanmuMsg(@Body requestBody: RequestBody):BaseResponse<String>

    //获取弹幕
    @GET("/bulletscreen/getBulletScreenInfo")
    suspend fun getVideoDanmuMsg(@Query("datatype") dataType:Int,@Query("itemid") itemId: String):BaseResponse<List<DanmuEntity>>


}